﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using MartinRL.ProjectEuler.Sequences;

namespace MartinRL.ProjectEuler
{
    /// <summary>
    /// http://projecteuler.net/index.php?section=problems&id=12
    /// </summary>
    public static class Problem012
    {
        public static int FindTheFirstTriangleNumberToHaveOver500Divisors()
        {
            return TriangelNumberSequence.NewSequence()
                .First(t => t.NumberOfDivisors() > 500);
        }
    }
}